<?php
namespace API\Controller;
use Think\Controller;

class ApiController extends Controller
{
    public function findhouse(){
    	$num=$_GET['n'];
    	$str=$_GET['o'];
    	if ($str==null||$str=='') {
    		$str=="createtime";
    	}
        $result=M("rent")->order("'".$str." DESC'")->limit($num)->select();
        $datas=json_encode($result);
        echo $datas;      
    }


}
